package cn.wjx.taobaounion.utils;

import cn.wjx.taobaounion.presenter.ICategoryPagerPresenter;
import cn.wjx.taobaounion.presenter.IHomePresenter;
import cn.wjx.taobaounion.presenter.IOnSalePresenter;
import cn.wjx.taobaounion.presenter.ISearchPresenter;
import cn.wjx.taobaounion.presenter.ISelectedPresenter;
import cn.wjx.taobaounion.presenter.ITicketPresenter;
import cn.wjx.taobaounion.presenter.impl.CategoryPagerPresenterImpl;
import cn.wjx.taobaounion.presenter.impl.HomePresenterImpl;
import cn.wjx.taobaounion.presenter.impl.OnSalePresenterImpl;
import cn.wjx.taobaounion.presenter.impl.SearchPresenterImpl;
import cn.wjx.taobaounion.presenter.impl.SelectedPresenter;
import cn.wjx.taobaounion.presenter.impl.TicketPresenter;

/**
 * @author WuChangJian
 * @date 2020/6/22 21:16
 */
public class PresenterManger {
    private static final PresenterManger ourInstance = new PresenterManger();
    private final IHomePresenter mHomePresenter;
    private final ITicketPresenter mTicketPresenter;
    private final ISelectedPresenter mSelectedPresenter;
    private final ISearchPresenter mSearchPresenter;

    public IOnSalePresenter getOnSalePresenter() {
        return mOnSalePresenter;
    }

    private final OnSalePresenterImpl mOnSalePresenter;

    public ISelectedPresenter getSelectedPresenter() {
        return mSelectedPresenter;
    }

    public IHomePresenter getHomePresenter() {
        return mHomePresenter;
    }

    public ITicketPresenter getTicketPresenter() {
        return mTicketPresenter;
    }

    public ICategoryPagerPresenter getCategoryPagerPresenter() {
        return mCategoryPagerPresenter;
    }

    private final ICategoryPagerPresenter mCategoryPagerPresenter;

    public static PresenterManger getInstance() {
        return ourInstance;
    }

    public ISearchPresenter getSearchPresenter() {
        return mSearchPresenter;
    }

    private PresenterManger() {
        mHomePresenter = new HomePresenterImpl();
        mTicketPresenter = new TicketPresenter();
        mCategoryPagerPresenter = new CategoryPagerPresenterImpl();
        mSelectedPresenter = new SelectedPresenter();
        mOnSalePresenter = new OnSalePresenterImpl();
        mSearchPresenter = new SearchPresenterImpl();
    }
}
